package linwen.wang.service;

import linwen.wang.pojo.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @ClassName UserService
 * @Description TODO
 * @Author zero
 * @DATE 2023/8/6 10:33 PM
 * @Version 1.0
 */

@Service
@Slf4j
@Validated
public class UserService {
    public @NotNull User getUser(@Min(18) int i) {
        return User.builder().id(i)
                .username("zhangsan")
                .age(18)
                .build();
    }
}
